package com.felight;

import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;

public class queue {
	public static void main(String[] Felight){
		Queue<String> queue = new LinkedList<String>();
		
		queue.add("iphone 3GS");
		queue.add("iphone 4");
		queue.add("iphone 4S");
		queue.add("iphone 5");
		queue.add("iphone 5S");
		
		System.out.println("Size of queue" +queue.size());
		
		Iterator queueIterator = queue.iterator();
		while(queueIterator.hasNext()){
			System.out.println(" " +queueIterator.next());
	                 
		}
		queue.remove();queue.remove();queue.remove();
		
		System.out.println("\nSize of Queue" +queue.size());
		queueIterator = queue.iterator();
		while(queueIterator.hasNext()){
			System.out.println(" " +queueIterator.next());
		}
	}

}
